import java.util.Scanner;
public class HomeWork03 {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        Vehicle v;
        String n = scanner.next();
        int p = scanner.nextInt();
        int t = scanner.nextInt();
        String _n = scanner.next();
        int _p = scanner.nextInt();
        int s = scanner.nextInt();
        v = new Car(n,p,t);
        v.showme();
        v = new Bus(_n,_p,s);
        v.showme();
    }
}
abstract class Vehicle{
    protected String Name;
    protected int Price;
   public Vehicle(String n,int p){
    }

    public Vehicle() {

    }

    public abstract void showme();
}
class Car extends Vehicle{
    protected int Type;
    public Car(String n, int p, int t){
        super();
        this.Price = p;
        this.Name = n;
        this.Type = t;
    }
    @Override
    public void showme() {
        System.out.println("Car's name="+Name+",Price="+Price+",type="+Type);
    }
}
class Bus extends Vehicle{
    protected int Seat;
    public Bus(String n,int p,int s){
        this.Name = n;
        this.Price = p;
        this.Seat = s;
    }
    @Override
    public void showme(){
        System.out.println("Bus's name="+Name+",Price="+Price+",seat="+Seat);
    }
}